package datasources.Druid;

import utils.JDBCUtils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class DruidDemo2 {
    public static void main(String[] args) throws SQLException {
        Connection conn = JDBCUtils.getConnection();
        Statement stmt = conn.createStatement();
        String sql = "select * from account";
        ResultSet rs = stmt.executeQuery(sql);
        rs.next();
        int it = rs.getInt(1);
        System.out.println(it);
        JDBCUtils.close(conn,stmt);


    }
}
